package dataHandlers;

import java.sql.SQLException;
import java.util.LinkedList;

import clientData.ForumDataInt;
import clientData.MemberDataInt;
import clientData.PostDataInt;
import clientData.TopicDataInt;
import exception.ForumNotFoundException;
import exception.PostNotExistException;
import exception.TopicNotFoundException;



public interface DataControlerInt{
	public void removeForum(int forumId) throws ForumNotFoundException, SQLException;
	public void removeTopic(int forumId, int topicId) throws ForumNotFoundException, SQLException;
	public void removePost(int forumId, int topicId, int postId) throws TopicNotFoundException, ForumNotFoundException, SQLException;
	public LinkedList<ForumDataInt> getForums() throws SQLException;
	public LinkedList<TopicDataInt> getTopics(int forumId) throws ForumNotFoundException, SQLException;

	public void removeMember(String userName) throws SQLException;
	//public LinkedList<MemberInt> getMembers();

	public void editPost(int oldPostId, int forumId, int topicId, String newContent,String newTitle) throws ForumNotFoundException, TopicNotFoundException, SQLException;
	public void removeFriend(String userName, String friendUserName) throws SQLException;
	public void addFriend(String userName, String friendUserName) throws SQLException;
	public int addForum(String userName, String forumName) throws SQLException;
	public int addTopic(String userName, int forumId, String topicTitle) throws ForumNotFoundException, SQLException;
	public LinkedList<PostDataInt> getPosts(int forumId, int topicId) throws ForumNotFoundException, TopicNotFoundException, SQLException;
	public LinkedList<MemberDataInt> getFriends(String userName) throws SQLException;
	public LinkedList<MemberDataInt> getMembersByPrefix(String userNamePrefix) throws SQLException;
	public int addPost(String userName, int forumId, int topicId,
			String postTitle, String postContent) throws ForumNotFoundException, TopicNotFoundException, SQLException;
	public void addMember(String userName, int id, String email,
			String firstName, String lastName) throws SQLException;
	
	public boolean forumExist(int forumId) throws SQLException;
	public boolean topicExist(int forumId,int topicId) throws SQLException;
	public boolean postExist(int forumId,int topicId,int postId) throws SQLException;
	public boolean userExist(String userName) throws SQLException;
	
	public boolean isCreatorOfPost(int forumId,int topicId,int PostId,String userName) throws ForumNotFoundException, TopicNotFoundException, PostNotExistException, SQLException;
	
	public String getTopicCreator(int forumId,int topicId) throws SQLException;
	
	public ForumDataInt getForumData(int forumId) throws SQLException;
	public TopicDataInt getTopicData(int forumId, int topicId) throws SQLException;
	public PostDataInt getPostData(int forumId,int TopicId ,int postId) throws SQLException;
	
}
